package com.jiajia.service.impl;

import com.jiajia.annotation.DataSource;
import com.jiajia.mapper.UserMapper;
import com.jiajia.model.User;
import com.jiajia.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zjiajia
 * @date 2024/7/9 15:55
 */
@Service
@DataSource("slave")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> allUser() {
        return userMapper.allUsers();
    }
}
